<style>
    #add {
        padding: 20px 25px 25px 0;
    }

    #add .layui-treeSelect .ztree li a, .ztree li span {
        margin: 0 0 2px 3px !important;
    }
</style>
<div class="layui-fluid" id="shareView">
    <form class="layui-form" action="" lay-filter="share-view-form" enctype="multipart/form-data" id="share-view-form">

        <div class="layui-form-item">
            <label class="layui-form-label febs-form-item-require">标题</label>
            <div class="layui-input-block">
                <input type="text" readonly autocomplete="off" name="title" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label febs-form-item-require">链接</label>
            <div class="layui-input-block">
                <input type="text" readonly autocomplete="off" name="shareUrl" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item" style="display: none">
            <label class="layui-form-label febs-form-item-require">分享id</label>
            <div class="layui-input-block">
                <input type="text " name="shareId"  class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-form-item">
                <label class="layui-form-label">分享头图</label>
                <img alt="头像" style="width: 200px;height: 160px" title="点我更换头像" data-th-src="@{${share.imgUrl}}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label febs-form-item-require">分享描述：</label>
            <div class="layui-input-block">
                <input type="text" readonly name="description" autocomplete="off" lay-verify="required" class="layui-input">
            </div>
        </div>

<!--        <div class="layui-form-item" >-->
<!--            <label class="layui-form-label febs-form-item-require">状态：</label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="radio" disabled name="status" value="1" title="online">-->
<!--                <input type="radio" disabled name="status" value="0" title="offline">-->
<!--            </div>-->
<!--        </div>-->
    </form>
</div>
<script data-th-inline="javascript">
    layui.use(['febs', 'form', 'layedit', 'validate', 'upload'], function () {
        var $ = layui.$,
            febs = layui.febs,
            layer = layui.layer,
            form = layui.form,
            $view = $('#shareView'),
            share = [[${share}]],
            upload = layui.upload,
            validate = layui.validate;

        form.verify(validate);
        form.render();

        initUserValue();

        function initUserValue() {
            form.val("share-view-form", {
                "shareId":share.shareId,
                "title": share.title,
                "description":share.description,
                "activityId":share.activityId,
                "limitNumber":share.limitNumber,
                "shareUrl":share.shareUrl,
                "status": share.status,
            });
        }

    });
</script>